#include "GameObject.h"
#include "File.h"

void GameObject::Load(char* filename)
{
	m_pSprite = Sprite::Load(filename); // GoGo Gadget Sprite class to load the image
	File newFile;
	newFile.Open("gameobject.txt");
	newFile.GetFloat(&m_positionx);
	newFile.GetFloat(&m_positiony);
}

void GameObject:: Update()
{
	// Nothing for now
}

void GameObject::Draw()
{
	Sprite::Draw(GameInst::Instance()->GetScreen(), m_pSprite, m_positionx, m_positiony);
}

void GameObject::Clean()
{
	SDL_FreeSurface(m_pSprite); // Free the surface
	delete this; // Delete object
}